﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>权限管理 - 帐号管理</title>
    <#include "/pages/include/head.ftl" />
	<#import "/pages/import/images.ftl" as img />
    
    <style type="text/css">
      .tree-left-height{height:510px;}
   </style>
</head>
<body>
<div class="popwindow-title">重置密码</div>
<div class="popwindow-container">
<@s.form id="saveform" name="saveform" action="paramaccount-list!passwordReset" namespace="/pages/person/account" method="POST">
<table cellspacing="1" cellpadding="0" class="form-2column form-margin">
    <tr>
      <th>帐户id：</th>
      <td class="from-require"><input type="hidden" name="id" value="${Request.id}"/><input type="text" name="id" value="${Request.id}" onclick="alert(this.value);" disabled class="input-common input-word-10" /></td>
    </tr>
    <tr>
      <th><label for="commonityNumber">帐户密码：</label></th>
      <td class="from-require"><input type="text" id="password" name="password" class="input-common input-word-10" />
（ 密码无限制 ，密码最小长度为6位 ）</td>
    </tr>
    <tr>
      <th>再次输入密码：</th>
      <td class="from-require">
        <input type="text" id="passwordConfirm" name="passwordConfirm" class="input-common input-word-10" /></td>
    </tr> 
  </table>
  </@s.form>
</div>
<div class="popwindow-btn-area">
<div class="btn-order" onclick="passwordReset()">
     <ul>
     <li class="left-normal" id="btn1_11"></li>
     <li class="middle-normal" id="btn1_12" ><img src="../../../images/ico16/ico-ok.gif" alt="" />确 定</li>
     <li class="right-normal" id="btn1_13"></li>
     </ul>
</div>
<div class="btn-order" onclick="windowClose()">
     <ul>
     <li class="left-normal" id="btn1_31"></li>
     <li class="middle-normal" id="btn1_32"><img src="../../../images/ico16/ico-cancel.gif" alt="" />取 消</li>
     <li class="right-normal" id="btn1_33"></li>
     </ul>
</div>
</div>
</body>
<script>
   function passwordReset(){
       var password = $('#password').val();
          var repassword = $('#passwordConfirm').val();
          if(password!=repassword){
             alert("两次输入密码不一致");
             return;
          }
          

          $.ajax({                                                
           type: "POST",                                     
           url: "paramaccount!passwordReset.action",                                   
           data: $("#saveform").formToArray(),
           success: function(msg){
            alert("密码重置成功");
            parent.$("#accountGrid").trigger("reloadGrid");
            windowClose();
          } 
        });
          
   }
</script>
</html>
